import { createStore, compose, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import reducer from './reducer';

//这个是为了使用 redux-devtools-extention
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

const store = createStore(reducer, composeEnhancers(
    // 这个是为了使用thunk 中间间；
      applyMiddleware(thunk)
  ));

export default store;






